import request from '@/utils/request'

// 定金订单列表page
export function getList(form, pageSize, currentPage) {
  const data = {
    param: form,
    pageSize: pageSize,
    pageNo: currentPage
  }
  return request.post('/sq/inventory/page', data)
}
// 定金订单列表详情
export function detailById(id) {
  return request.get(`/sq/order/dj/${id}`)
}
// 定金订单列表page
export function getPage(form, pageSize, currentPage) {
  const data = {
    param: form,
    pageSize: pageSize,
    pageNo: currentPage
  }
  return request.post('/sq/carRecord/page', data)
}
// 定金订单列表详情
export function findAll(params) {
  return request.post(`/sq/ygfl/findAll`, params)
}
// 厂家上报
export function postReport(params) {
  return request.post(`/sq/inventory/report`, params)
}

// 退货出库
export function saleReturn(params) {
  return request.post(`/sq/inventory/saleReturn`,params)
}
// 更改预警天数
export function setWarningDay(id, dayNum) {
  return request.get(`/sq/inventory/warningDayNum/${id}/${dayNum}`)
}

/**
 *修改返利信息
 * @param {*} data = {pageNo: 0, pageSize: 0, param: {accidentTypeDictId,storeId,tiltle}}
 */
export function updateRebate(params = {}) {
  return request.post(`/sq/inventory/updateRebate`, params)
}
